package com.usian.controller;

import com.usian.ContentFeign;
import com.usian.utils.AdNode;
import com.usian.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sun.security.krb5.internal.crypto.RsaMd5CksumType;

import java.util.List;

@RestController
@RequestMapping("/frontend/content")
public class ContentController {

    @Autowired
    private ContentFeign contentFeign;


    /**
     * 首页查询大广告
     *
     * @return
     */
    @RequestMapping("selectFrontendContentByAD")
    public Result selectFrontendContentByAD(){
        List<AdNode> list =contentFeign.selectFrontendContentByAD();
        if(list.size()>0){
            return  Result.ok(list);
        }
        return Result.error("查无数据");
    }
}
